;;; auto-complete-octave.el --- auto-complete-mode extension for GNU Octave

;; Filename: auto-complete-octave.el
;; Description: auto-complete-mode extension for GNU Octave
;; Author: Yen-Chin,Lee  coldnew.tw@gmail.com
;; Maintainer: Yen-Chin,Lee coldnew.tw@gmail.com
;; Copyright (C)  2009, Yen-Chin,Lee  , all rights reserved.
;; Created: 2009-03-01 14:25:33
;; Version: 0.1
;; Last-Updated: 2009-03-01 14:25:33
;;           By: Yen-Chin,Lee
;; URL: http://www.emacswiki.org/emacs/download/auto-complete-octave.el
;; Keywords: auto-complete
;; Compatibility: GNU Emacs 23.0.91
;;
;; Features that might be required by this library:
;;
;; `auto-complete'
;;
;;; This file is NOT part of GNU Emacs

;;; License
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
;; Floor, Boston, MA 02110-1301, USA.

;;; Commentary:
;;
;; Some extension for auto-complete-mode.
;;
;; Below are commands you can use:
;;
;; `ac-source-octave'
;;      Provide a completion for octave or matlab.
;;
;;

;;; Installation:
;;
;; Put auto-complete-octave.el to your load-path.
;; The load-path is usually ~/elisp/.
;; It's set in your ~/.emacs like this:
;; (add-to-list 'load-path (expand-file-name "~/elisp"))
;;
;; No need more.

;;; Change log:
;;
;; 2009/03/01
;;      First released.
;;

;;; Acknowledgements:
;;
;;  
;;

;;; TODO
;;
;;
;;


;; Require
(require 'auto-complete)


;;; Code:
(defconst octave-keywords
   (sort (list
;; A -----------------------------------------------------------------
    "aCos" "adsmax" "and" "argnames" "atanint"
    "aCosh" "airy" "anderson_darling_cdf" "argv" "atexit"
    "aSin" "airy_Ai" "anderson_darling_test" "arithmetic_decode" "att"
    "aSinh" "airy_Ai_deriv" "angle" "arithmetic_encode" "au"
    "aTan" "airy_Ai_deriv_scaled" "anova" "arma_rnd" "auload"
    "aTanh" "airy_Ai_scaled" "anovan" "arrayfun" "auplot"
    "aa2int" "airy_Bi" "ans" "aryule" "aurecord"
    "abcddim" "airy_Bi_deriv" "any" "asci" "ausave"
    "abs" "airy_Bi_deriv_scaled" "apkconst" "asctime" "autocor"
    "accumarray" "airy_Bi_scaled" "append" "asec" "autocov"
    "acos" "airy_zero_Ai" "append_save" "asecd" "autoload"
    "acosd" "airy_zero_Ai_deriv" "apply" "asech" "autonan"
    "acosh" "airy_zero_Bi" "applylut" "asin" "autoreg_matrix"
    "acot" "airy_zero_Bi_deriv" "ar_psd" "asind" "autoscale"
    "acotd" "all" "arburg" "asinh" "autumn"
    "acoth" "amdemod" "arch_fit" "assert" "average_moments"
    "acsc" "aminolookup" "arch_rnd" "assignin" "awgn"
    "acscd" "ammod" "arch_test" "atan" "axes"
    "acsch" "amodce" "are" "atan2" "axis"
    "addpath" "analdemo" "area" "atand" "axis2dlim"
    "ademodce" "ancestor" "arg" "atanh"
;; B -----------------------------------------------------------------
    "balance" "bessel_Knu" "betainc" "biterr" "bsc" "builtin:real"
    "bar" "bessel_Knu_scaled" "betainv" "bitget" "bscchannel" "builtin:reshape"
    "barh" "bessel_Yn" "betaln" "bitmax" "bsxfun" "builtin:round"
    "barthannwin" "bessel_Ynu" "betapdf" "bitor" "buffer" "builtin:sin"
    "bartlett" "bessel_il_scaled" "betarnd" "bitrevorder" "bug_report" "builtin:sinh"
    "bartlett_test" "bessel_jl" "betastat" "bitset" "buildssic" "builtin:sqrt"
    "base2dec" "bessel_kl_scaled" "bfgsmin" "bitshift" "builtin" "builtin:sum"
    "base64decode" "bessel_lnKnu" "bfgsmin_example" "bitxor" "builtin:abs" "builtin:sumsq"
    "base64encode" "bessel_yl" "bi2de" "blackman" "builtin:angle" "builtin:tan"
    "battery" "bessel_zero_J0" "bicg" "blackmanharris" "builtin:arg" "builtin:tanh"
    "bchdeco" "bessel_zero_J1" "bicubic" "blackmannuttall" "builtin:atan2" "bunzip2"
    "bchenco" "besselh" "bilinear" "blanks" "builtin:ceil" "busdate"
    "bchpoly" "besseli" "bin2dec" "blkdiag" "builtin:conj" "busdays"
    "bddemo" "besselj" "bincoeff" "blkproc" "builtin:cos" "butter"
    "beep" "besselk" "binocdf" "bmpwrite" "builtin:cosh" "buttord"
    "beep_on_error" "bessely" "binoinv" "bode" "builtin:cumprod" "bwarea"
    "bessel" "bestblk" "binomial_cdf" "bode_bounds" "builtin:cumsum" "bwborder"
    "bessel_In" "beta" "binomial_inv" "bohmanwin" "builtin:diag" "bwdist"
    "bessel_In_scaled" "beta_cdf" "binomial_pdf" "bolling" "builtin:exp" "bweuler"
    "bessel_Inu" "beta_gsl" "binomial_rnd" "bone" "builtin:find" "bwfill"
    "bessel_Inu_scaled" "beta_inv" "binopdf" "box" "builtin:floor" "bwhitmiss"
    "bessel_Jn" "beta_pdf" "binornd" "boxcar" "builtin:imag" "bwlabel"
    "bessel_Jnu" "beta_rnd" "binostat" "boxplot" "builtin:log" "bwmorph"
    "bessel_Kn" "betacdf" "bitand" "break" "builtin:log10" "bwperim"
    "bessel_Kn_scaled" "betai" "bitcmp" "brighten" "builtin:prod" "bwselect"
;; C -----------------------------------------------------------------
    "c2d" "chisquare_inv" "commutation_matrix" "cosd"
    "calendar" "chisquare_pdf" "compan" "cosets"
    "canonicalize_file_name" "chisquare_rnd" "compand" "cosh"
    "cart2pol" "chisquare_test_homogeneity" "compare_versions" "cosint"
    "cart2sph" "chisquare_test_independence" "compass" "cot"
    "case" "chol" "complement" "cotd"
    "caseread" "chol2inv" "completion_append_char" "coth"
    "casewrite" "cholinv" "completion_matches" "coupling_3j"
    "cast" "circshift" "complex" "coupling_6j"
    "cat" "class" "computer" "coupling_9j"
    "catch" "clausen" "concat" "cov"
    "catmullrom" "clc" "cond" "cplxpair"
    "cauchy_cdf" "clear" "condeig" "cplxreal"
    "cauchy_inv" "clearplot" "condentr_seq" "cpsd"
    "cauchy_pdf" "cleave" "condest" "cputime"
    "cauchy_rnd" "clf" "conditionalentropy_XY" "crash_dumps_octave_core"
    "caxis" "clg" "conditionalentropy_YX" "create_lookup_table"
    "cceps" "clip" "confirm_recursive_rmdir" "create_set"
    "ccolamd" "clock" "conicalP_0" "cross"
    "cd" "cloglog" "conicalP_1" "csape"
    "cdiff" "close" "conicalP_half" "csapi"
    "ceil" "closeplot" "conicalP_mhalf" "csc"
    "cell" "closereq" "conj" "cscd"
    "cell2csv" "cmorwavf" "conndef" "csch"
    "cell2mat" "cmpermute" "connect" "csd"
    "cell2struct" "cmunique" "continue" "cstrcmp"
    "celldisp" "cochrancdf" "contour" "csv2cell"
    "cellfun" "cochraninv" "contour3" "csv2latex"
    "cellidx" "cochrantest" "contourc" "csvconcat"
    "cellstr" "coeff" "contourf" "csvexplode"
    "center" "cohere" "controldemo" "csvread"
    "char" "col2im" "conv" "csvwrite"
    "chdir" "colamd" "conv2" "csymamd"
    "cheb" "colfilt" "convhull" "ctime"
    "cheb1ord" "collect" "convhulln" "ctranspose"
    "cheb2ord" "colloc" "convmtx" "ctrb"
    "chebwin" "colorbar" "cool" "cumprod"
    "cheby1" "colorgradient" "copper" "cumsum"
    "cheby2" "colormap" "copulacdf" "cumtrapz"
    "chi2cdf" "colperm" "copulapdf" "cut"
    "chi2inv" "colstyle" "copyfile" "cyclgen"
    "chi2pdf" "columns" "cor" "cyclpoly"
    "chi2rnd" "com2str" "cor_test" "cylinder"
    "chi2stat" "combs" "cordflt2" "czt"
    "chirp" "comma" "corr2"
    "chisqouttest" "common_size" "corrcoef"
    "chisquare_cdf" "comms" "cos"
;; D -----------------------------------------------------------------
    "d2_min" "de2bi" "deriv" "dldsolver"
    "d2c" "deal" "det" "dlmread"
    "damp" "deblank" "detrend" "dlmwrite"
    "dare" "debug_on_error" "dezero" "dlqe"
    "daspk" "debug_on_interrupt" "dfdp" "dlqg"
    "daspk_options" "debug_on_warning" "dftmtx" "dlqr"
    "dasrt" "debug_symtab_lookups" "dgkfdemo" "dlyap"
    "dasrt_options" "debye_1" "dgram" "dmperm"
    "dassl" "debye_2" "dhinfdemo" "dmr2d"
    "dassl_options" "debye_3" "diag" "dmult"
    "datatype" "debye_4" "diary" "do"
    "date" "dec2base" "diff" "do_string_escapes"
    "dateaxis" "dec2bin" "differentiate" "doc"
    "datefind" "dec2hex" "diffpara" "document"
    "datenum" "decimate" "digits" "dos"
    "datesplit" "decode" "dilate" "dot"
    "datestr" "deconv" "dim" "double"
    "datevec" "default_save_options" "dir" "downsample"
    "dawson" "degree" "dirac" "drawnow"
    "day" "deintrlv" "diric" "dre"
    "daysact" "del2" "discrete_cdf" "dsearch"
    "dbclear" "delaunay" "discrete_inv" "dsearchn"
    "dbstatus" "delaunay3" "discrete_pdf" "dst"
    "dbstop" "delaunayn" "discrete_rnd" "dump_prefs"
    "dbtype" "delete" "disp" "dup2"
    "dbwhere" "delta_method" "dispatch" "duplication_matrix"
    "dcgain" "demo" "display_fixed_operations" "durbinlevinson"
    "dct" "demodmap" "dixoncdf" "dwt"
    "dct2" "demoquat" "dixoninv" "dxfwrite"
    "dctmtx" "deref" "dixontest"
    "ddmat" "deriche" "dkalman"
;; E -----------------------------------------------------------------
    "e" "empirical_pdf" "erfcinv" "exp_mult"
    "easter" "empirical_rnd" "erfcx" "expand"
    "echo" "encode" "erfinv" "expcdf"
    "echo_executing_commands" "end" "erode" "expdemo"
    "edge" "end_try_catch" "errno" "expfit"
    "edit" "end_unwind_protect" "errno_list" "expint"
    "edit_history" "endef" "error" "expint_3"
    "editdistance" "endfor" "error_text" "expint_E1"
    "effrr" "endfunction" "errorbar" "expint_E2"
    "egolaydec" "endgrent" "eta" "expint_Ei"
    "egolayenc" "endif" "eta_int" "expinv"
    "egolaygen" "endpwent" "etime" "expm"
    "eig" "endswitch" "etree" "expm1"
    "ellint_Ecomp" "endwhile" "etreeplot" "exponential_cdf"
    "ellint_Kcomp" "entropy" "eval" "exponential_inv"
    "ellip" "eomdate" "evalin" "exponential_pdf"
    "ellipdemo" "eomday" "ex_matrix" "exponential_rnd"
    "ellipj" "eps" "example" "exppdf"
    "ellipke" "eq" "example_netcdf" "exprel"
    "ellipord" "erf" "example_opendap" "exprel_2"
    "ellipsoid" "erf_Q" "example_optiminterp" "exprel_n"
    "else" "erf_Z" "exec" "exprnd"
    "elseif" "erf_gsl" "exist" "expstat"
    "empirical_cdf" "erfc" "exit" "eye"
    "empirical_inv" "erfc_gsl" "exp" "eyediagram"
;; F -----------------------------------------------------------------
    "f_cdf" "ffloor" "fixed" "fractdiff"
    "f_inv" "fflush" "fixed_point_count_operations" "frdemo"
    "f_pdf" "fft" "fixed_point_debug" "fread"
    "f_rnd" "fft2" "fixed_point_format" "freal"
    "f_test_regression" "fftconv" "fixed_point_library_version" "freport"
    "fabs" "fftconv2" "fixed_point_version" "freqchkw"
    "factor" "fftfilt" "fixed_point_warn_overflow" "freqs"
    "factorial" "fftn" "fixedpoint" "freqs_plot"
    "fail" "fftshift" "flag" "freqz"
    "false" "fftw" "flattopwin" "freqz_plot"
    "fangle" "fgetl" "flipdim" "freshape"
    "farg" "fgets" "fliplr" "frewind"
    "fatan2" "fht" "flipud" "frnd"
    "fbusdate" "fibodeco" "float" "fround"
    "fcdf" "fiboenco" "flog" "fscanf"
    "fceil" "fibosplitstream" "flog10" "fseek"
    "fclear" "fieldnames" "floor" "fsin"
    "fclose" "figure" "flops" "fsinh"
    "fcnchk" "file_in_loadpath" "fmdemod" "fsolve"
    "fcntl" "file_in_path" "fmin" "fsolve_options"
    "fconj" "fileattrib" "fminbnd" "fsort"
    "fcos" "fileparts" "fmins" "fspecial"
    "fcosh" "filesep" "fminsearch" "fsqrt"
    "fcumprod" "fill" "fminunc" "fstat"
    "fcumsum" "filter" "fmmod" "fsum"
    "fdiag" "filter2" "fmod" "fsumsq"
    "fdisp" "filtfilt" "fnder" "ftan"
    "feather" "filtic" "fnmatch" "ftanh"
    "feedback" "fimag" "fnplt" "ftell"
    "feof" "find" "fnval" "full"
    "fermi_dirac_3half" "findobj" "fopen" "fullfact"
    "fermi_dirac_half" "findstr" "for" "fullfile"
    "fermi_dirac_inc_0" "findsym" "fork" "func2str"
    "fermi_dirac_int" "findsymbols" "format" "function"
    "fermi_dirac_mhalf" "finite" "formula" "functions"
    "ferror" "finv" "fpdf" "funm"
    "fetch" "fir1" "fplot" "fv"
    "feval" "fir2" "fprintf" "fvl"
    "fexist" "fir2sys" "fprod" "fwrite"
    "fexp" "firls" "fputs" "fzero"
    "ff2n" "fix" "fracshift"
;; G -----------------------------------------------------------------
    "gamcdf" "genpath" "gfilter" "golombdeco"
    "gamfit" "genqamdemod" "gftable" "golombenco"
    "gaminv" "genqammod" "gfweight" "gplot"
    "gamlike" "geocdf" "gifft" "gprod"
    "gamma" "geoinv" "ginput" "gradient"
    "gamma_cdf" "geomean" "ginv" "gram"
    "gamma_gsl" "geometric_cdf" "ginverse" "grank"
    "gamma_inc" "geometric_inv" "gisequal" "gray"
    "gamma_inc_P" "geometric_pdf" "givens" "gray2ind"
    "gamma_inc_Q" "geometric_rnd" "glob" "graycomatrix"
    "gamma_inv" "geopdf" "global" "grayslice"
    "gamma_pdf" "geornd" "glog" "graythresh"
    "gamma_rnd" "geostat" "glpk" "grep"
    "gammai" "get" "glpkmex" "greshape"
    "gammainc" "getegid" "gls" "grid"
    "gammainv_gsl" "getenv" "glu" "griddata"
    "gammaln" "geteuid" "gmap40" "griddata3"
    "gammastar" "getfield" "gmm_estimate" "griddatan"
    "gampdf" "getfields" "gmm_example" "groots"
    "gamrnd" "getgid" "gmm_obj" "grpdelay"
    "gamstat" "getgrent" "gmm_results" "grubbscdf"
    "gauspuls" "getgrgid" "gmm_variance" "grubbsinv"
    "gaussian" "getgrnam" "gmm_variance_inefficient" "grubbstest"
    "gausswin" "getid" "gmonopuls" "gsl_sf"
    "gca" "getpgrp" "gmtime" "gsqrt"
    "gcd" "getpid" "gnuplot_binary" "gsum"
    "gcf" "getppid" "gnuplot_command_axes" "gsumsq"
    "gconv" "getpwent" "gnuplot_command_end" "gsvd"
    "gconvmtx" "getpwnam" "gnuplot_command_plot" "gt"
    "gdeconv" "getpwuid" "gnuplot_command_replot" "gtext"
    "gdet" "getrusage" "gnuplot_command_splot" "gunzip"
    "gdftmtx" "getuid" "gnuplot_command_title" "gzip"
    "gdiag" "gexp" "gnuplot_command_using"
    "ge" "gf" "gnuplot_command_with"
    "gen2par" "gfft" "gnuplot_use_title_option"
;; H -----------------------------------------------------------------
    "h2norm" "hinfsyn" "houghtf"
    "h2syn" "hinfsyn_chk" "hour"
    "hadamard" "hinfsyn_ric" "housh"
    "hammgen" "hist" "hsv"
    "hamming" "hist2d" "hsv2rgb"
    "hankel" "histeq" "huffmandeco"
    "hann" "histfit" "huffmandict"
    "hanning" "history" "huffmanenco"
    "harmmean" "history_file" "hurst"
    "hartley_entropy" "history_size" "hygecdf"
    "hazard" "history_timestamp_format_string" "hygeinv"
    "heaviside" "hmmestimate" "hygepdf"
    "help" "hmmgenerate" "hygernd"
    "hess" "hmmviterbi" "hygestat"
    "hex2dec" "hold" "hyperg_0F1"
    "hhigh" "holidays" "hyperg_1F1"
    "hidden" "home" "hyperg_U"
    "highlow" "horzcat" "hypergeometric_cdf"
    "hilb" "hot" "hypergeometric_inv"
    "hilbert" "hotelling_test" "hypergeometric_pdf"
    "hinf_ctr" "hotelling_test_2" "hypergeometric_rnd"
    "hinfdemo" "hough_circle" "hzeta"
    "hinfnorm" "hough_line"
;; I -----------------------------------------------------------------
    "i" "ind2sub" "irsa_normalize" "isfield"
    "idct" "index" "irsa_plotdft" "isfigure"
    "idct2" "inf" "irsa_resample" "isfinite"
    "idplot" "info_file" "irsa_rgenreal" "isfixed"
    "idsim" "info_program" "is_abcd" "isgalois"
    "idst" "infoentr_seq" "is_bool" "isglobal"
    "if" "infogain_seq" "is_complex" "isgraph"
    "ifft" "infoskeleton" "is_controllable" "isgray"
    "ifft2" "inline" "is_detectable" "ishandle"
    "ifftn" "inpolygon" "is_dgkf" "ishold"
    "ifftshift" "input" "is_digital" "isieee"
    "ifht" "input_event_hook" "is_duplicate_entry" "isind"
    "ignore_function_time_stamp" "inputname" "is_ex" "isinf"
    "im2bw" "int16" "is_global" "isinteger"
    "im2col" "int2aa" "is_leap_year" "iskeyword"
    "im2double" "int2str" "is_list" "isletter"
    "im2uint16" "int32" "is_matrix" "islist"
    "im2uint8" "int64" "is_observable" "islogical"
    "imadjust" "int8" "is_sample" "islower"
    "imag" "interp" "is_scalar" "ismac"
    "image" "interp1" "is_signal_list" "ismatrix"
    "image_viewer" "interp2" "is_siso" "ismember"
    "imagesc" "interp3" "is_square" "isna"
    "imclose" "interpft" "is_stabilizable" "isnan"
    "imcomplement" "interpn" "is_stable" "isnumeric"
    "imdilate" "intersect" "is_stream" "ispc"
    "imerode" "intersection" "is_struct" "isposint"
    "imfilter" "intmax" "is_sym" "isprime"
    "imginfo" "intmin" "is_symmetric" "isprimitive"
    "imhist" "intrlv" "is_vector" "isprint"
    "immaximas" "inv" "is_vpa" "ispunct"
    "imnoise" "inverse" "isa" "israwcommand"
    "imopen" "invfreq" "isalnum" "isreal"
    "impad" "invfreqs" "isalpha" "isrecord"
    "imperspectivewarp" "invfreqz" "isascii" "isrgb"
    "impulse" "invhilb" "isbool" "isscalar"
    "impz" "inz" "isbusday" "issorted"
    "imread" "ipermute" "isbw" "isspace"
    "imremap" "iqr" "iscell" "issparse"
    "imresize" "irr" "iscellstr" "issquare"
    "imrotate" "irsa_act" "ischar" "isstr"
    "imrotate_Fourier" "irsa_actcore" "iscntrl" "isstreamoff"
    "imshear" "irsa_check" "iscommand" "isstruct"
    "imshow" "irsa_dft" "iscomplex" "issymmetric"
    "imsmooth" "irsa_dftfp" "isdefinite" "isunix"
    "imtophat" "irsa_genreal" "isdigit" "isupper"
    "imtranslate" "irsa_idft" "isdir" "isvarname"
    "imwrite" "irsa_isregular" "isempty" "isvector"
    "ind2gray" "irsa_jitsp" "isequal" "isxdigit"
    "ind2rgb" "irsa_mdsp" "isequalwithequalnans"
;; J -----------------------------------------------------------------
    "j" "jet" "jet707" "jointentropy" "jpgread" "jpgwrite" "jsucdf" "jsupdf"
;; K -----------------------------------------------------------------
    "kaiser" "kernel_density_nodes" "keyboard" "kruskal_wallis_test"
    "kaiserord" "kernel_example" "kill" "krylov"
    "kbhit" "kernel_optimal_bandwidth" "kolmogorov_smirnov_cdf" "krylovb"
    "kendall" "kernel_regression" "kolmogorov_smirnov_test" "kullback_leibler_distance"
    "kernel_density" "kernel_regression_cvscore" "kolmogorov_smirnov_test_2" "kurtosis"
    "kernel_density_cvscore" "kernel_regression_nodes" "kron"
;; L -----------------------------------------------------------------
    "label2rgb" "lin2mu" "logit"
    "laguerre" "line" "loglog"
    "lambert_W0" "line_min" "loglogerr"
    "lambert_Wm1" "link" "logm"
    "lambertw" "linkage" "logncdf"
    "laplace_cdf" "linspace" "logninv"
    "laplace_inv" "list" "lognormal_cdf"
    "laplace_pdf" "list_in_columns" "lognormal_inv"
    "laplace_rnd" "list_primes" "lognormal_pdf"
    "lasterr" "listen" "lognormal_rnd"
    "lasterror" "listidx" "lognpdf"
    "lastwarn" "llow" "lognrnd"
    "lauchli" "lloyds" "lognstat"
    "laverage" "lnbeta" "logsig"
    "lbusdate" "lncosh" "logspace"
    "lchol" "lngamma_gsl" "lookfor"
    "lcm" "lnpoch" "lookup"
    "lcoeff" "lnsinh" "lookup_table"
    "ldegree" "load" "lower"
    "ldivide" "loadaudio" "lqe"
    "le" "loadimage" "lqg"
    "leasqr" "localtime" "lqr"
    "leasqrdemo" "log" "ls"
    "legend" "log10" "ls_command"
    "legendre" "log2" "lsim"
    "legendre_Pl" "log_1plusx" "lsode"
    "legendre_Plm" "log_1plusx_mx" "lsode_options"
    "legendre_Ql" "log_erfc" "lstat"
    "legendre_sphPlm" "logical" "lt"
    "legendre_sphPlm_array" "logistic_cdf" "ltifr"
    "length" "logistic_inv" "lu"
    "leval" "logistic_pdf" "luinc"
    "levinson" "logistic_regression" "lweekdate"
    "lfdif" "logistic_regression_derivatives" "lyap"
    "lgamma" "logistic_regression_likelihood" "lz77deco"
    "license" "logistic_rnd" "lz77enco"
;; M -----------------------------------------------------------------
    "m2xdate" "matdeintrlv" "meshgrid" "mkoctfile" "month"
    "mad" "matintrlv" "meshz" "mkpp" "months"
    "magic" "matrix_type" "mex" "mkstemp" "more"
    "mahalanobis" "max" "mexext" "mktheta" "morlet"
    "makeinfo_program" "max_recursion_depth" "mexihat" "mktime" "movavg"
    "makelut" "mcnemar_test" "meyeraux" "mldivide" "movefile"
    "manova" "md5sum" "mfilename" "mle_estimate" "mpoles"
    "map" "mdsmax" "min" "mle_example" "mpower"
    "marcumq" "mean" "min_max" "mle_obj" "mrdivide"
    "marginalc" "mean2" "minfo" "mle_obj_nodes" "mscohere"
    "marginalr" "meansq" "minimize" "mle_results" "mtimes"
    "mark_as_command" "medfilt1" "minpol" "mle_variance" "mu2lin"
    "mark_as_rawcommand" "medfilt2" "minus" "mlock" "munlock"
    "mark_for_deletion" "median" "minute" "mod" "mutualinfo_seq"
    "mat2cell" "menu" "mirr" "moddemo" "mutualinformation"
    "mat2gray" "mesh" "mislocked" "mode" "mvnpdf"
    "mat2str" "meshc" "mkdir" "modmap" "mvnrnd"
    "match" "meshdom" "mkfifo" "moment"
;; N -----------------------------------------------------------------
    "name" "ncatt" "ncshort" "nls_obj_nodes" "now"
    "nan" "ncauer" "ncsync" "nmsmax" "nper"
    "nanmax" "ncautonan" "nctest" "nnz" "npv"
    "nanmean" "ncautoscale" "ncvar" "nomrr" "nrm"
    "nanmedian" "ncbyte" "ndgrid" "nonmax_supress" "nth"
    "nanmin" "ncchar" "ndims" "nonzeros" "nthroot"
    "nanstd" "ncclose" "ne" "norm" "ntsc2rgb"
    "nansum" "ncdatatype" "negvolidx" "normal_cdf" "null"
    "nanvar" "ncdim" "nelder_mead_min" "normal_inv" "num2cell"
    "nargchk" "ncdouble" "netcdf" "normal_pdf" "num2str"
    "nargin" "ncdump" "newff" "normal_rnd" "numden"
    "nargout" "ncenddef" "newplot" "normcdf" "numel"
    "narysource" "ncfloat" "news" "normest" "numgradient"
    "native_float_format" "nchoosek" "nextpow2" "norminv" "numhessian"
    "nbincdf" "ncint" "nichols" "normpdf" "nuttallwin"
    "nbininv" "ncisrecord" "nlfilter" "normplot" "nweekdate"
    "nbinpdf" "nclong" "nls_estimate" "normrnd" "nyquist"
    "nbinrnd" "ncname" "nls_example" "normstat" "nze"
    "nbinstat" "ncredef" "nls_obj" "not" "nzmax"
;; O -----------------------------------------------------------------
    "obsv" "odebda" "odepkg_testsuite_implakzo" "optiminterp2"
    "ocean" "odebdi" "odepkg_testsuite_implrober" "optiminterp3"
    "oct2dec" "odeexamples" "odepkg_testsuite_impltrans" "optiminterp4"
    "octave_config_info" "odeget" "odepkg_testsuite_oregonator" "optiminterpn"
    "octave_core_file_limit" "odekdi" "odepkg_testsuite_pollution" "optimset"
    "octave_core_file_name" "odephas2" "odepkg_testsuite_robertson" "or"
    "octave_core_file_options" "odephas3" "odepkg_testsuite_transistor" "ord2"
    "octave_tmp_file_name" "odepkg" "odeplot" "orderfields"
    "ode23" "odepkg_event_handle" "odeprint" "ordfilt2"
    "ode23d" "odepkg_examples_dae" "oders" "ordfiltn"
    "ode2r" "odepkg_examples_dde" "odeset" "orient"
    "ode45" "odepkg_examples_ide" "odesx" "orth"
    "ode45d" "odepkg_examples_ode" "ols" "otherwise"
    "ode54" "odepkg_structure_check" "onbalvol" "outer"
    "ode54d" "odepkg_testsuite_calcmescd" "onenormest" "outlier"
    "ode5r" "odepkg_testsuite_calcscd" "ones" "output_max_field_width"
    "ode78" "odepkg_testsuite_chemakzo" "optiminterp" "output_precision"
    "ode78d" "odepkg_testsuite_hires" "optiminterp1"
;; P -----------------------------------------------------------------
    "pack" "periodogram" "pol2cart" "primes"
    "packedform" "perms" "polar" "primpoly"
    "packsys" "permute" "poly" "princomp"
    "padarray" "perror" "poly2mask" "print"
    "page_output_immediately" "persistent" "poly2sym" "print_answer_id_name"
    "page_screen_output" "physical_constant" "poly2th" "print_empty_dimensions"
    "pamdemod" "pi" "poly_2_ex" "print_usage"
    "pammod" "pie" "polyarea" "printf"
    "parallel" "pink" "polyconf" "prism"
    "parameterize" "pinv" "polyder" "probably_prime"
    "paren" "pipe" "polyderiv" "probit"
    "pareto" "pkg" "polyfit" "prod"
    "parseparams" "place" "polygcd" "program_invocation_name"
    "partcnt" "playaudio" "polyint" "program_name"
    "partint" "plot" "polyinteg" "prompt"
    "parzenwin" "plot3" "polyout" "prop_test_2"
    "pascal" "plotyy" "polyreduce" "pserver"
    "pascal_cdf" "plus" "polystab" "psi"
    "pascal_inv" "pmt" "polyval" "psi_1_int"
    "pascal_pdf" "pngread" "polyvalm" "psi_1piy"
    "pascal_rnd" "pngwrite" "popen" "psi_n"
    "patch" "poch" "popen2" "pskdemod"
    "path" "pochrel" "postpad" "pskmod"
    "pathdef" "pointfig" "poststd" "pulstran"
    "pathsep" "poisscdf" "posvolidx" "purelin"
    "pause" "poissinv" "pow2" "purge_tmp_files"
    "pburg" "poisson" "power" "putenv"
    "pcg" "poisson_cdf" "ppplot" "puts"
    "pchip" "poisson_inv" "ppval" "pv"
    "pclose" "poisson_moments" "prctile" "pvl"
    "pcolor" "poisson_pdf" "premainder" "pwd"
    "pcr" "poisson_rnd" "prepad" "pwelch"
    "pcregexp" "poisspdf" "prestd" "pyulear"
    "pdist" "poissrnd" "prettyprint" "pzmap"
    "peaks" "poisstat" "prettyprint_c"
;; Q -----------------------------------------------------------------
    "qamdemod" "qderiv" "qp" "qtgetblk" "quad_options" "quiver3"
    "qammod" "qderivmat" "qp_kaiser" "qtrans" "quadl" "quotient"
    "qaskdeco" "qfunc" "qqplot" "qtransv" "quantiz" "qz"
    "qaskenco" "qfuncinv" "qr" "qtransvmat" "quaternion" "qzhess"
    "qconj" "qinv" "qtable" "qtsetblk" "quit" "qzval"
    "qcoordinate_plot" "qmult" "qtdecomp" "quad" "quiver"
;; R -----------------------------------------------------------------
    "radon" "readdir" "replot" "rmfield"
    "rainbow" "readlink" "repmat" "rmoutlier"
    "rand" "real" "resample" "rmpath"
    "randdeintrlv" "realmax" "reset_fixed_operations" "roicolor"
    "rande" "realmin" "reshape" "roots"
    "randerr" "record" "residue" "rose"
    "randg" "rectangle_lw" "residued" "rosenbrock"
    "randint" "rectangle_sw" "residuez" "rosser"
    "randintrlv" "rectpuls" "resize" "rot90"
    "randn" "rectwin" "rethrow" "rotate_scale"
    "random" "recv" "return" "rotdim"
    "randp" "redef" "reval" "rotg"
    "randperm" "reduce" "reverse" "rotparams"
    "randsrc" "redundancy" "rgb2gray" "rotv"
    "range" "reedmullerdec" "rgb2hsv" "round"
    "rank" "reedmullerenc" "rgb2ind" "rows"
    "ranks" "reedmullergen" "rgb2ntsc" "rref"
    "rat" "regdatasmooth" "rgbplot" "rsdec"
    "rate" "regexp" "rgdtsmcore" "rsdecof"
    "rats" "regexpi" "rgdtsmcorewrap" "rsenc"
    "raylcdf" "regexprep" "ribbon" "rsencof"
    "raylinv" "regress" "ricedeco" "rsgenpoly"
    "raylpdf" "rehash" "riceenco" "rsindex"
    "raylrnd" "relativeentropy" "rindex" "run"
    "raylstat" "rem" "rldemo" "run_cmd"
    "rceps" "remainder" "rledeco" "run_count"
    "rdivide" "remez" "rleenco" "run_history"
    "read_options" "rename" "rlocus" "run_test"
    "read_readline_init_file" "renyi_entropy" "rmdir" "runlength"
;; S -----------------------------------------------------------------
    "safeprod" "spalloc" "strftime"
    "samin" "sparse" "string_fill_char"
    "samin_example" "sparse_auto_mutate" "strjoin"
    "save" "spatan2" "strjust"
    "saveMLPStruct" "spchol" "strmatch"
    "save_header_format_string" "spchol2inv" "strncmp"
    "save_precision" "spcholinv" "strncmpi"
    "saveaudio" "spconvert" "strptime"
    "saveimage" "spcumprod" "strrep"
    "savepath" "spcumsum" "strsort"
    "saving_history" "spdet" "strtok"
    "sawtooth" "spdiag" "strtrim"
    "scale_data" "spdiags" "strtrunc"
    "scanf" "spearman" "struct"
    "scatter" "specgram" "struct2cell"
    "scatter3" "spectral_adf" "struct_contains"
    "scatterplot" "spectral_xdf" "struct_elements"
    "schur" "speed" "struct_levels_to_print"
    "sclose" "spencer" "structfun"
    "scloseall" "speye" "strvcat"
    "scores" "spfind" "studentize"
    "sec" "spfun" "sub2ind"
    "secd" "sph2cart" "subplot"
    "sech" "sphcat" "subs"
    "second" "sphere" "subsasgn"
    "semicolon" "spinmap" "subsref"
    "semilogx" "spinv" "substr"
    "semilogxerr" "spkron" "substruct"
    "semilogy" "splchol" "sum"
    "semilogyerr" "splice" "sum_moments_nodes"
    "send" "spline" "summer"
    "seqreverse" "split" "sumsq"
    "series" "split_long_rows" "sumterms"
    "server" "splot" "suppress_verbose_help_message"
    "set" "splu" "surf"
    "setaudio" "spmax" "surface"
    "setdiff" "spmin" "surfc"
    "setenv" "spones" "surfnorm"
    "setfield" "spparms" "svd"
    "setfields" "spprod" "swap"
    "setgrent" "spqr" "swapbytes"
    "setpwent" "sprand" "swapcols"
    "setstr" "sprandn" "swaprows"
    "setxor" "sprandsym" "switch"
    "sftrans" "sprank" "syl"
    "sgolay" "spring" "sylvester_matrix"
    "sgolayfilt" "sprintf" "sym"
    "shading" "spstats" "sym2poly"
    "shannon_entropy" "spsum" "symamd"
    "shannonfanodeco" "spsumsq" "symbfact"
    "shannonfanodict" "spvcat" "symbols"
    "shannonfanoenco" "spy" "symerr"
    "shanwavf" "sqp" "symfsolve"
    "shell_cmd" "sqrt" "syminfo"
    "shg" "sqrtm" "symlink"
    "shift" "square" "symlsolve"
    "shiftdim" "squareform" "symrcm"
    "sighup_dumps_octave_core" "squeeze" "sync"
    "sign" "ss" "synchrotron_1"
    "sign_test" "ss2sys" "synchrotron_2"
    "sigterm_dumps_octave_core" "ss2tf" "syndtable"
    "silent_functions" "ss2zp" "synthesis"
    "sim" "sscanf" "sys2fir"
    "sin" "stairs" "sys2ss"
    "sinc" "starp" "sys2tf"
    "sinc_gsl" "stat" "sys2zp"
    "sind" "static" "sysadd"
    "sinetone" "statistics" "sysappend"
    "sinewave" "std" "syschnames"
    "single" "std2" "syschtsam"
    "sinh" "stderr" "sysconnect"
    "sinint" "stdin" "syscont"
    "size" "stdnormal_cdf" "sysdimensions"
    "size_equal" "stdnormal_inv" "sysdisc"
    "sizeof" "stdnormal_pdf" "sysdup"
    "skewness" "stdnormal_rnd" "sysgetsignals"
    "sleep" "stdout" "sysgettsam"
    "slice" "stem" "sysgettype"
    "slurp_file" "stem3" "sysgroup"
    "sndfile_load" "step" "sysidx"
    "sndfile_play" "stft" "sysmin"
    "sndfile_save" "str2double" "sysmult"
    "sombrero" "str2func" "sysout"
    "sort" "str2mat" "sysprune"
    "sortcom" "str2num" "sysreorder"
    "sortrows" "strappend" "sysrepdemo"
    "sos2tf" "strcat" "sysscale"
    "sos2zp" "strcmp" "syssetsignals"
    "sosfilt" "strcmpi" "syssub"
    "sound" "streamoff" "system"
    "sound_play_utility" "strerror" "systematize"
    "soundsc" "stretchlim" "sysupdate"
    "source" "strfind"
;; T -----------------------------------------------------------------
    "t_cdf" "tempdir" "test_struct" "tmpfile" "triangle_lw"
    "t_inv" "tempname" "test_wpolyfit" "tmpnam" "triangle_sw"
    "t_pdf" "terminal_size" "texas_lotto" "to_char" "tricontour"
    "t_rnd" "test" "text" "to_double" "tril"
    "t_test" "test_d2_min_1" "textread" "toascii" "trimesh"
    "t_test_2" "test_d2_min_2" "tf" "toc" "trimmean"
    "t_test_regression" "test_d2_min_3" "tf2sos" "today" "triplot"
    "table" "test_ellint" "tf2ss" "toeplitz" "tripuls"
    "tabulate" "test_ellipj" "tf2sys" "tolower" "triu"
    "tan" "test_fminunc_1" "tf2zp" "toupper" "trnd"
    "tand" "test_gsvd" "tfe" "tpdf" "true"
    "tanh" "test_hyperg" "tfestimate" "trace" "try"
    "tansig" "test_min_1" "tfout" "train" "tsearch"
    "tar" "test_min_2" "thfm" "transport_2" "tsearchn"
    "tars" "test_min_3" "thirdwednesday" "transport_3" "tstat"
    "taxedrr" "test_min_4" "tic" "transport_4" "tukeywin"
    "taylorcoeff" "test_minimize_1" "tics" "transport_5" "tunstallcode"
    "tblread" "test_nelder_mead_min_1" "tilde_expand" "transpose" "type"
    "tblwrite" "test_nelder_mead_min_2" "time" "trapz" "typecast"
    "tcdf" "test_optiminterp" "times" "trastd" "typeinfo"
    "tcoeff" "test_optiminterp_mult" "tinv" "treeplot" "tzero"
    "temp_name" "test_sncndn" "title" "triang" "tzero2"
;; U -----------------------------------------------------------------
    "u_test" "unaryenc" "uniform_pdf" "unmark_command" "unwrap"
    "ugain" "undo_string_escapes" "uniform_rnd" "unmark_rawcommand" "unzip"
    "uint16" "unidcdf" "unifpdf" "unmkpp" "upfirdn"
    "uint32" "unidinv" "unifrnd" "unpack" "uplus"
    "uint64" "unidpdf" "unifstat" "unpacksys" "upper"
    "uint8" "unidrnd" "union" "unscale_parameters" "upsample"
    "uintlut" "unidstat" "unique" "untar" "urlread"
    "umask" "unifcdf" "unitfeedback" "until" "urlwrite"
    "uminus" "unifinv" "units" "unvech" "usage"
    "uname" "uniform_cdf" "unix" "unwind_protect" "usleep"
    "unarydec" "uniform_inv" "unlink" "unwind_protect_cleanup"
;; V -----------------------------------------------------------------
    "values" "varargout" "vectorize" "vol"
    "vander" "variables_can_hide_functions" "ver" "voronoi"
    "var" "vec" "version" "voronoin"
    "var_test" "vec2mat" "vertcat" "vpa"
    "varargin" "vech" "view"
;; W -----------------------------------------------------------------
    "waitbar" "wblcdf" "weibpdf" "wgn" "whos_line_format" "wpolyfit"
    "waitforbuttonpress" "wblinv" "weibrnd" "wgt1o" "wiener_rnd" "wpolyfitdemo"
    "waitpid" "wblpdf" "weibull_cdf" "what" "wienrnd" "wrev"
    "warning" "wblrnd" "weibull_inv" "which" "wilcoxon_test" "wsolve"
    "warning_ids" "wblstat" "weibull_pdf" "while" "wilkinson"
    "warranty" "weekday" "weibull_rnd" "white" "window"
    "wavread" "weibcdf" "welch_test" "who" "winter"
    "wavwrite" "weibinv" "welchwin" "whos" "wkeep"
;; X -----------------------------------------------------------------
    "x2mdate" "xcorr" "xcorr2" "xcov" "xlabel" "xlim" "xlsread" "xmlread" "xmlwrite" "xor"
;; Y -----------------------------------------------------------------
    "yahoo" "year" "yeardays" "yes_or_no" "ylabel" "ylim" "yulewalker"
;; Z -----------------------------------------------------------------
    "z_test" "zeros" "zgfmul" "zgreduce" "zgsgiv" "zip" "zoom" "zp2ss" "zplane"
    "z_test_2" "zeta" "zgfslv" "zgrownorm" "zgshsr" "zlabel" "zp" "zp2sys" "zpout"
    "zagzig" "zeta_int" "zginit" "zgscal" "zigzag" "zlim" "zp2sos" "zp2tf" "zscore"
) #'(lambda (a b) (< (length a) (length b)))))

(defvar ac-source-octave
      '((candidates
         . (lambda ()
             (all-completions ac-target octave-keywords))))
      "Source for octave keywords.")

(add-hook 'octave-mode-hook
    (lambda ()
     (make-local-variable 'ac-sources)
      (setq ac-sources '(
            ac-source-octave
))))
;; ---------------------------------------------------------
(provide 'auto-complete-octave)

